package com.wrh.draw;

import com.wrh.draw.layer.LonLatLayer;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wrh
 */
public class LonLatPanel {

    private List<LonLatLayer> lonLatLayers;

    private double lonMin;
    private double lonMax;
    private double latMin;
    private double latMax;

    public LonLatPanel(double lonMin, double lonMax, double latMin, double latMax) {
        this.lonMin = lonMin;
        this.lonMax = lonMax;
        this.latMin = latMin;
        this.latMax = latMax;

        this.lonLatLayers = new ArrayList<>(10);

    }

    public static LonLatPanel createLonLatPanel(double lonMin, double lonMax, double latMin, double latMax) {
        return new LonLatPanel(lonMin,lonMax,latMin,latMax);
    }

    public LonLatPanel addLayer(LonLatLayer lonLatLayer){
        this.lonLatLayers.add(lonLatLayer);
        return this;
    }



    public List<LonLatLayer> getLonLatLayers() {
        // todo 按 zIndex 从下往上排序
        return lonLatLayers;
    }

    public double getLonMin() {
        return lonMin;
    }

    public double getLonMax() {
        return lonMax;
    }

    public double getLatMin() {
        return latMin;
    }

    public double getLatMax() {
        return latMax;
    }
}
